import ToolActionApi from "@/tool/http/tool-action.js";

let elementAction = ToolActionApi.init("game_element");
let mapTemplateAction = ToolActionApi.init("game_map_template");

const rule = {
  queryParams: [],
  formOnChange: (watchForm) => {
    return [];
  },
  pageConfig: {},
  metaConfig: {},
  baseField: [],
};

export default async function (metadata) {
  rule.metaConfig.element_id = {
    dictList: await elementAction.dict(),
  };
  rule.metaConfig.map_template_id = {
    dictList: await mapTemplateAction.dict(),
  };
  return rule;
}
